package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.system.entity.AbdulBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 入库明细 Entity
 *
 * @author ruoyi
 * @date 2025-06-04
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel("出入库明细信息")
@Data
@TableName("inv_inventory_details")
public class InventoryDetails extends AbdulBaseEntity {

    @ApiModelProperty(value = "主键ID", example = "1")
    private Long id;

    @ApiModelProperty(value = "商品类别", example = "茶叶")
    private String category;

    @ApiModelProperty(value = "商品分类", example = "饮品")
    private String classification;

    /**
     * 商品库中商品id
     */
    @ApiModelProperty(value = "商品库中商品id")
    private Long productManagementId ;

    @ApiModelProperty(value = "商品名称", required = true, example = "红茶")
    private String name;

    @ApiModelProperty(value = "商品条码", required = true, example = "BAR-1001")
    private String barcode;

    @ApiModelProperty(value = "单位", example = "罐")
    private String unit;

    @ApiModelProperty(value = "商品规格", example = "250g/罐")
    private String specification;

    @ApiModelProperty(value = "库存单价（元）", example = "88.00")
    private BigDecimal inventoryPrice;

    @ApiModelProperty(value = "出入库数量", example = "50")
    private Integer inboundQuantity;

    @ApiModelProperty(value = "库存总值（元）", example = "4400.00")
    @TableField(value = "inventory_value",insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private BigDecimal inventoryValue;

    @ApiModelProperty(value = "采购单价（元）", example = "80.00")
    private BigDecimal purchasePrice;

    @ApiModelProperty(value = "采购总值（元）", example = "4000.00")
    @TableField(value = "purchase_value",insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private BigDecimal purchaseValue;

    @ApiModelProperty(value = "入库单ID", example = "1001")
    private Long warehousingEntryId;

    @ApiModelProperty("操作类型（1-入库 2-出库）")
    private Integer isType;

}
